#include "../Basics/BasicStruct.cpp"

// 统计叶子数量

int leaf(TreeNode* bt) {
    if(bt == NULL) {
        return 0;
    }
    if (bt->leftChild == NULL && bt->rightChild == NULL) {
        printf("%d", bt->data);
        return 1;
    }
    return leaf(bt->leftChild) + leaf(bt->rightChild);
}